﻿<%@ Page Title="Trocar Senha" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TrocaSenhaView.aspx.cs" Inherits="ASPPanificadora.Telas.TrocaSenhaView" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h1>Trocar Senha</h1>
    <br />
    <p>
        <asp:Label ID="Label1" Text="Senha Atual:" runat="server" Width="300"/>
        <asp:TextBox ID="txtSenhaAtual" runat="server" Width="300" CssClass="textBox" 
            TextMode="Password" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSenhaAtual" ErrorMessage="*Obrigatório" ForeColor="Red" />
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
            ErrorMessage="*Mínimo de 6 caracteres" ControlToValidate="txtSenhaAtual" 
            ForeColor="Red" ValidationExpression="\w{6,}"></asp:RegularExpressionValidator>
    </p>
    <p>
        <asp:Label ID="Label2" Text="Nova Senha:" runat="server" Width="300"/>
        <asp:TextBox ID="txtNovaSenha" runat="server" Width="300" CssClass="textBox" TextMode="Password" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtNovaSenha" ErrorMessage="*Obrigatório" ForeColor="Red" />
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ErrorMessage="*Mínimo de 6 caracteres" ControlToValidate="txtNovaSenha" 
            ForeColor="Red" ValidationExpression="\w{6,}"></asp:RegularExpressionValidator>
    </p>
    <p>
        <asp:Label ID="Label3" Text="Repetir Nova Senha:" runat="server" Width="300"/>
        <asp:TextBox ID="txtConfirmaSenha" runat="server" Width="300" CssClass="textBox" TextMode="Password" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtConfirmaSenha" ErrorMessage="*Obrigatório" ForeColor="Red" />
        <asp:CompareValidator ID="CompareValidator1" runat="server" 
            ErrorMessage="*Nova senha difere da comparação" ForeColor="Red" 
            ControlToCompare="txtNovaSenha" ControlToValidate="txtConfirmaSenha"></asp:CompareValidator>
    </p>
    
    <div class="submitButton">
        <asp:Button ID="btnSalvar" Text="Salvar" runat="server" Width="80" Height="80"
            onclick="btnSalvar_Click"/>
        <asp:Button ID="btnCancelar" Text="Cancelar" runat="server" Width="80" Height="80"
            onclick="btnCancelar_Click" CausesValidation="False"/>
    </div>
</asp:Content>
